<!--
 * @Author: [wangll]
 * @Date: 2021-09-17 14:20:37
 * @LastEditors: [wangll]
 * @LastEditTime: 2021-09-23 15:45:55
 * @Description: 封装底部组件
-->
<template>
  <div>
    <!-- 底部开始 -->
    <div class="footer">
      <div class="address">
        {{address}}
      </div>
      <div class="copyright">
        版权所有：山西大学党委宣传部 邮编030006 联系电话：0351-7010166
      </div>
    </div>
    <!-- 底部结束 -->
  </div>
</template>

<script>
import {get} from '../utils/request';
export default {
    data(){
        return {
            address:''
        }
    },
    created(){
        this.loadAddress();
    },
    methods:{
        //加载地址
        loadAddress(){
            let url='/index/findByKey'
            get(url,{name:'address'}).then(res=>{
                let data=res.data;
                // 如果地址存在，返回
                if(data){
                    this.address=data.val;
                }
            })
        }
    }

};
</script>

<style lang="scss">
    //底部样式
    .footer {
        // background-image: url('/resource/img/footbg.jpg');
        text-align: center;
        background-color: #036f6f;
        color: #fff;
        padding: 2em 0;
    }
</style>